const Mock = require("mockjs");
let index = Mock.mock({
    "data|5": [ 
        {
            "indexName":"@cname",
            "fluctuationRange|0-1.0-99":0.5,
            "latestPrice|1000-10000":3000
        }
    ]
})
let newstock=Mock.mock({
    "data|5":[
        {
            "stockName":"@cname",
            "issueDate":'@date("yyyy-MM-dd")',
            "listingDate":'@date("yyyy-MM-dd")'
        }
    ]
})
let news=Mock.mock({
    "data|3":[
        {
            "title":"@cname",
            "time":'@date("yyyy-MM-dd")',
            "newsType":'m_icon_3',
            "description":'@paragraph'
        },
        {
            "title":"@cname",
            "time":'@date("yyyy-MM-dd")',
            "newsType":'m_icon_4',
            "description":'@paragraph'
        }
    ]
})
let hs=Mock.mock({
    "data|2":[
        {
            "plateName":"@cname",
            "dayBalance|100-500":120,
            "dayLimit|100-500": 122,
            "netInflow|100-1000":1233
        }
    ]
})
Mock.mock(/sdsx\/index/, 'get', () => { 
    return index
})
Mock.mock(/sdsx\/newstock/, 'get', () => { 
    return newstock
})
Mock.mock(/sdsx\/news/, 'get', () => { 
    return news
})
Mock.mock(/sdsx\/hs/, 'get', () => { 
    return hs
})
